<style scoped>
    .dayChose{margin-bottom: 10px;display: inline-block;}
    .dayChose>div{display: inline-block;}
    .dayChose .el-radio{margin-right: 10px;}
    .dayChose span{line-height: 24px;display: inline-block;padding: 0px 5px;}
    .dayChose .el-form-item{margin-bottom: 0px;margin-right: 0px;}
    .dayChose .el-date-editor.el-input{width:140px;}
    .dayChose  .el-select{width: 100px}
    .dayChose  .el-input{width: 100px}
</style>
<template>
    <div>
        <el-form :inline="true" :model="formInline" class="demo-form-inline" style="border-bottom:1px solid #ccc;">
            <!--法人名称-->
            <el-form-item :label="nowLangue.judgeName" class="selectMB10">
                <el-select size="mini" clearable :placeholder="nowLangue.pleaseSelect" v-model="formInline.categoryCode">
                    <el-option v-for="(subClass,index) in spareClassList" :key="index" :label="subClass.name" :value="subClass.code"></el-option>
                </el-select>
            </el-form-item>
            <!--产品线-->
            <el-form-item :label="nowLangue.productLine" class="selectMB10">
                <el-select size="mini" clearable :placeholder="nowLangue.pleaseSelect" v-model="formInline.categoryCode">
                    <el-option v-for="(subClass,index) in spareClassList" :key="index" :label="subClass.name" :value="subClass.code"></el-option>
                </el-select>
            </el-form-item>
            <!--备件分类描述-->
            <el-form-item :label="nowLangue.spareClassDescribe" class="selectMB10">
                <el-input size="mini" v-model="formInline.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
            </el-form-item>
            <!--非损代码-->
            <el-form-item :label="nowLangue.nonLossPhenomenon" class="selectMB10">
                <el-input size="mini" v-model="formInline.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
            </el-form-item>
            <!--非损现象-->
            <el-form-item :label="nowLangue.nonLossCode" class="selectMB10">
                <el-input size="mini" v-model="formInline.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
            </el-form-item>
            <!--类型-->
            <el-form-item :label="nowLangue.type" class="selectMB10">
                <el-select size="mini" clearable :placeholder="nowLangue.pleaseSelect" v-model="formInline.categoryCode">
                    <el-option v-for="(subClass,index) in spareClassList" :key="index" :label="subClass.name" :value="subClass.code"></el-option>
                </el-select>
            </el-form-item>
            <!--扣款价格类型-->
            <el-form-item :label="nowLangue.debitType" class="selectMB10">
                <el-select size="mini" clearable :placeholder="nowLangue.pleaseSelect" v-model="formInline.categoryCode">
                    <el-option v-for="(subClass,index) in spareClassList" :key="index" :label="subClass.name" :value="subClass.code"></el-option>
                </el-select>
            </el-form-item>
            <!--扣款系数-->
            <el-form-item :label="nowLangue.debitCoefficient" class="selectMB10">
                <el-input size="mini" v-model="formInline.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
            </el-form-item>
            <!--扣款金额-->
            <div class="dayChose">
                <el-form-item :label="nowLangue.debitMoney" class="selectMB10">
                    <el-input size="mini" v-model="formInline.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
                </el-form-item>
                <span v-text="nowLangue.to"></span>
                <el-form-item class="selectMB10" style="margin-right:20px;">
                    <el-input size="mini" v-model="formInline.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
                </el-form-item>
            </div>
            <!--创建时间-->
            <div class="dayChose">
                <el-form-item :label="nowLangue.createTime" class="selectMB10" >
                    <el-date-picker type="date" :editable="false" v-model="formInline.startCreateTime" clearable :placeholder="nowLangue.pleaseSelect" @change="selectedCreateTimeBegin"></el-date-picker>
                </el-form-item>
                <span v-text="nowLangue.to"></span>
                <el-form-item  class="selectMB10" style="margin-right:20px;">
                    <el-date-picker clearable :editable="false" v-model="formInline.endCreateTime"  type="date" :placeholder="nowLangue.pleaseSelect" @change="selectedCreateTimeEnd"></el-date-picker>
                </el-form-item>
            </div>
            <!--修改时间-->
            <div class="dayChose">
                <el-form-item :label="nowLangue.updateTime" class="selectMB10" >
                    <el-date-picker type="date" :editable="false" v-model="formInline.startCreateTime" clearable :placeholder="nowLangue.pleaseSelect" @change="selectedCreateTimeBegin"></el-date-picker>
                </el-form-item>
                <span v-text="nowLangue.to"></span>
                <el-form-item  class="selectMB10" >
                    <el-date-picker clearable :editable="false" v-model="formInline.endCreateTime"  type="date" :placeholder="nowLangue.pleaseSelect" @change="selectedCreateTimeEnd"></el-date-picker>
                </el-form-item>
            </div>
            <el-form-item class="selectMB10">
                <el-button class="bolder outsideBtnBS selectAll" :disabled="selectDisabled" size="mini" type="danger" v-text="nowLangue.query"></el-button>
            </el-form-item>
        </el-form>
        <!--表格-->
        <label class="default-label" v-text="nowLangue.StandardDetails"><!--非损标准--></label>
        <!--新增按钮-->
        <el-button class="bolder outsideBtnBS" size="mini" type="danger" @click="createNew()" v-text="nowLangue.newAdd"><!--新增--></el-button>
        <el-table :data="tableData" border style="width: 100%;" v-loading.body="loading" :element-loading-text="nowLangue.isLoading">
            <!--序-->
            <el-table-column type="index" header-align="center" align="center" :label="nowLangue.sequence" width="40"></el-table-column>
            <!--操作-->
            <el-table-column :label="nowLangue.operate" header-align="center" align="center" width="80">
                <template scope="scope">
                    <button class="operationItem bolder" :disabled="forbiddenDisabled" v-if="scope.row.status" @click="handleStatus(scope.$index,scope.row)" v-text="nowLangue.forbidden"></button>
                    <button class="operationItem bolder" :disabled="enableDisabled" v-else @click="handleStatus(scope.$index,scope.row)" v-text="nowLangue.enable"></button>
                    <button class="operationItem bolder" :disabled="scope.row.status" @click="update(scope.$index,scope.row)" v-text="nowLangue.update"></button>
                </template>
            </el-table-column>
            <!--产品线-->
            <el-table-column prop="" :label="nowLangue.productLine" header-align="center" show-overflow-tooltip></el-table-column>
            <!--备件小类-->
            <el-table-column prop="" :label="nowLangue.spareClass" header-align="center" show-overflow-tooltip></el-table-column>
            <!--计划大类-->
            <el-table-column prop="" :label="nowLangue.planClass" header-align="center" show-overflow-tooltip></el-table-column>
            <!--备件分类描述-->
            <el-table-column prop="" :label="nowLangue.spareClassDescribe" header-align="center" show-overflow-tooltip></el-table-column>
            <!--类型-->
            <el-table-column prop="" :label="nowLangue.type" header-align="center" show-overflow-tooltip></el-table-column>
            <!--非损代码-->
            <el-table-column prop="" :label="nowLangue.nonLossCode" header-align="center" show-overflow-tooltip></el-table-column>
            <!--非损现象-->
            <el-table-column prop="" :label="nowLangue.nonLossPhenomenon" header-align="center" show-overflow-tooltip></el-table-column>
            <!--扣款价格类型-->
            <el-table-column prop="" :label="nowLangue.debitType" header-align="center" show-overflow-tooltip></el-table-column>
            <!--扣款系数-->
            <el-table-column prop="" :label="nowLangue.debitCoefficient" header-align="center" show-overflow-tooltip></el-table-column>
            <!--扣款金额-->
            <el-table-column prop="" :label="nowLangue.debitMoney" header-align="center" show-overflow-tooltip></el-table-column>
            <!--故障现象-->
            <el-table-column prop="" :label="nowLangue.faultPhenomenon" header-align="center" show-overflow-tooltip></el-table-column>
            <!--创建人员-->
            <el-table-column prop="" :label="nowLangue.creator" header-align="center" show-overflow-tooltip></el-table-column>
            <!--创建时间-->
            <el-table-column prop="" :label="nowLangue.createTime" header-align="center" show-overflow-tooltip></el-table-column>
            <!--修改人员-->
            <el-table-column prop="" :label="nowLangue.updator" header-align="center" show-overflow-tooltip></el-table-column>
            <!--最近修改时间-->
            <el-table-column prop="" :label="nowLangue.lastUpdateTime" header-align="center" show-overflow-tooltip></el-table-column>
            <!--法人信息-->
            <el-table-column prop="" :label="nowLangue.judgeInfor" header-align="center" show-overflow-tooltip></el-table-column>
        </el-table>
        <el-pagination v-if="isPaging"  @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="currentPage3" :current-page="pageIndex"  :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :page-count="totalPage" :total="totalNumber"></el-pagination>
        <!--新增弹窗-->
        <el-dialog :title="nowLangue.addStandard" :visible.sync="dialogAddVisible" :lock-scroll=false>
            <el-form :inline="true" :model="addForm" class="demo-form-inline label-minW95" style="border-bottom:1px solid #ccc;" ref="addForm">
                <!--法人名称-->
                <el-form-item :label="nowLangue.judgeName" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                    <el-input size="mini" class="disabledClick" disabled v-model="addForm.groupCode2"></el-input>
                </el-form-item>
                <!--创建人员-->
                <el-form-item :label="nowLangue.creator" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                    <el-input size="mini" class="disabledClick" disabled v-model="addForm.groupCode2"></el-input>
                </el-form-item>
                <!--创建时间-->
                <el-form-item :label="nowLangue.createTime" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                    <el-input size="mini" class="disabledClick" disabled v-model="addForm.groupCode2"></el-input>
                </el-form-item>
                <!--产品线-->
                <el-form-item :label="nowLangue.productLine" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                    <el-select size="mini" :placeholder="nowLangue.pleaseImport" v-model="addForm.subClassCode">
                        <el-option></el-option>
                    </el-select>
                </el-form-item>
                <!--计划大类-->
                <el-form-item :label="nowLangue.planClass" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                    <el-select size="mini" :placeholder="nowLangue.pleaseImport" v-model="addForm.subClassCode">
                        <el-option></el-option>
                    </el-select>
                </el-form-item>
                <!--备件小类-->
                <el-form-item :label="nowLangue.spareClass" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                    <el-select size="mini" :placeholder="nowLangue.pleaseImport" v-model="addForm.subClassCode">
                        <el-option></el-option>
                    </el-select>
                </el-form-item>
                <!--备件分类描述-->
                <p>
                    <el-form-item :label="nowLangue.spareClassDescribe" class="selectMB10 default-flex">
                        <el-input size="mini" v-model="addForm.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
                    </el-form-item>
                </p>
                <!--非损代码-->
                <el-form-item :label="nowLangue.nonLossCode" class="selectMB10">
                    <el-input size="mini" v-model="addForm.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
                </el-form-item>
                <!--非损现象-->
                <p>
                    <el-form-item :label="nowLangue.nonLossPhenomenon" class="selectMB10 default-flex">
                        <el-input size="mini" v-model="addForm.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
                    </el-form-item>
                </p>
                <!--类型-->
                <el-form-item :label="nowLangue.type" class="selectMB10">
                    <el-select size="mini" clearable :placeholder="nowLangue.pleaseSelect" v-model="addForm.categoryCode">
                        <el-option v-for="(subClass,index) in spareClassList" :key="index" :label="subClass.name" :value="subClass.code"></el-option>
                    </el-select>
                </el-form-item>
                <!--扣款价格类型-->
                <el-form-item :label="nowLangue.debitType" class="selectMB10">
                    <el-select size="mini" clearable :placeholder="nowLangue.pleaseSelect" v-model="addForm.price">
                        <el-option label="固定价" :value="1"></el-option>
                        <el-option label="押款价" :value="2"></el-option>
                        <el-option label="代理价" :value="3"></el-option>
                    </el-select>
                </el-form-item>
                <!--扣款系数-->
                <el-form-item :label="nowLangue.debitCoefficient" class="selectMB10" v-if="addForm.price!=1">
                    <el-input size="mini" v-model="addForm.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
                </el-form-item>
                <!--扣款金额-->
                <el-form-item :label="nowLangue.debitMoney" class="selectMB10">
                    <el-input size="mini" v-model="addForm.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
                </el-form-item>
                <!--故障现象-->
                <p>
                    <el-form-item class="default-flex" :label="nowLangue.faultPhenomenon" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                        <el-input v-model="addForm.code" type="textarea" resize="none" :placeholder="nowLangue.pleaseImport"></el-input>
                    </el-form-item>
                </p>

            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button class="bolder outsideBtnBS" size="mini" type="danger" v-text="nowLangue.sure"></el-button>
                <el-button class="bolder outsideBtnBS" size="mini" type="danger" v-text="nowLangue.cancel"></el-button>
            </div>
        </el-dialog>
        <!--修改弹窗-->
        <el-dialog :title="nowLangue.updateStandard" :visible.sync="dialogUpdateVisible" :lock-scroll=false>
            <el-form :inline="true" :model="updateForm" class="demo-form-inline label-minW95" style="border-bottom:1px solid #ccc;" ref="updateForm">
                <!--法人名称-->
                <el-form-item :label="nowLangue.judgeName" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                    <el-input size="mini" class="disabledClick" disabled v-model="updateForm.groupCode2"></el-input>
                </el-form-item>
                <!--创建人员-->
                <el-form-item :label="nowLangue.creator" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                    <el-input size="mini" class="disabledClick" disabled v-model="updateForm.groupCode2"></el-input>
                </el-form-item>
                <!--创建时间-->
                <el-form-item :label="nowLangue.createTime" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                    <el-input size="mini" class="disabledClick" disabled v-model="updateForm.groupCode2"></el-input>
                </el-form-item>
                <!--产品线-->
                <el-form-item :label="nowLangue.productLine" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                    <el-select size="mini" :placeholder="nowLangue.pleaseImport" v-model="updateForm.subClassCode">
                        <el-option></el-option>
                    </el-select>
                </el-form-item>
                <!--计划大类-->
                <el-form-item :label="nowLangue.planClass" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                    <el-select size="mini" :placeholder="nowLangue.pleaseImport" v-model="updateForm.subClassCode">
                        <el-option></el-option>
                    </el-select>
                </el-form-item>
                <!--备件小类-->
                <el-form-item :label="nowLangue.spareClass" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                    <el-select size="mini" :placeholder="nowLangue.pleaseImport" v-model="updateForm.subClassCode">
                        <el-option></el-option>
                    </el-select>
                </el-form-item>
                <!--备件分类描述-->
                <p>
                    <el-form-item :label="nowLangue.spareClassDescribe" class="selectMB10 default-flex">
                        <el-input size="mini" v-model="updateForm.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
                    </el-form-item>
                </p>
                <!--非损代码-->
                <el-form-item :label="nowLangue.nonLossCode" class="selectMB10">
                    <el-input size="mini" v-model="updateForm.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
                </el-form-item>
                <!--非损现象-->
                <p>
                    <el-form-item :label="nowLangue.nonLossPhenomenon" class="selectMB10 default-flex">
                        <el-input size="mini" v-model="updateForm.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
                    </el-form-item>
                </p>
                <!--类型-->
                <el-form-item :label="nowLangue.type" class="selectMB10">
                    <el-select size="mini" clearable :placeholder="nowLangue.pleaseSelect" v-model="updateForm.categoryCode">
                        <el-option v-for="(subClass,index) in spareClassList" :key="index" :label="subClass.name" :value="subClass.code"></el-option>
                    </el-select>
                </el-form-item>
                <!--扣款价格类型-->
                <el-form-item :label="nowLangue.debitType" class="selectMB10">
                    <el-select size="mini" clearable :placeholder="nowLangue.pleaseSelect" v-model="updateForm.price">
                        <el-option label="固定价" :value="1"></el-option>
                        <el-option label="押款价" :value="2"></el-option>
                        <el-option label="代理价" :value="3"></el-option>
                    </el-select>
                </el-form-item>
                <!--扣款系数-->
                <el-form-item :label="nowLangue.debitCoefficient" class="selectMB10" v-if="updateForm.price!=1">
                    <el-input size="mini" v-model="updateForm.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
                </el-form-item>
                <!--扣款金额-->
                <el-form-item :label="nowLangue.debitMoney" class="selectMB10">
                    <el-input size="mini" v-model="updateForm.materialName" :placeholder="nowLangue.pleaseImport"></el-input>
                </el-form-item>
                <!--故障现象-->
                <p>
                    <el-form-item class="default-flex" :label="nowLangue.faultPhenomenon" prop="code" :rules="[{ required: true, message: nowLangue.pleaseImport}]">
                        <el-input v-model="updateForm.code" type="textarea" resize="none" :placeholder="nowLangue.pleaseImport"></el-input>
                    </el-form-item>
                </p>

            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button class="bolder outsideBtnBS" size="mini" type="danger" v-text="nowLangue.sure"></el-button>
                <el-button class="bolder outsideBtnBS" size="mini" type="danger" v-text="nowLangue.cancel"></el-button>
            </div>
        </el-dialog>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                language:{
                    zh:{
                        "productLine":"产品线",
                        "planClass":"计划大类",
                        "spareClass":"备件小类",
                        "pleaseSelect":"请选择",
                        "pleaseImport":"请输入",
                        "spareCode":"备件编码",
                        "spareName":"备件名称",
                        "query":"查询",
                        "newAdd":"新增",
                        "forbidden":"禁用",
                        "enable":"启用",
                        "update":"修改",
                        "createTime":"创建时间",
                        "isLoading":"正在拼命加载中",
                        "sequence":"序",
                        "operate":"操作",
                        "type":"类型",
                        "StandardDetails":"非损标准列表",
                        "addStandard":"新增非损标准",
                        "updateStandard":"修改非损标准",
                        "sure":"确定",
                        "cancel":"取消",
                        "judgeName":"法人名称",
                        "spareClassDescribe":"备件分类描述",
                        "nonLossCode":"非损代码",
                        "nonLossPhenomenon":"非损现象",
                        "debitType":"扣款价格类型",
                        "debitCoefficient":"扣款系数",
                        "debitMoney":"扣款金额",
                        "updateTime":"修改时间",
                        "to":"至",
                        "faultPhenomenon":"故障现象",
                        "creator":"创建人员",
                        "updator":"修改人员",
                        "lastUpdateTime":"最近修改时间",
                        "judgeInfor":"法人信息"
                    },
                    en:{
                        "productLine":"productLine",
                        "planClass":"planClass",
                        "spareClass":"spareClass",
                        "pleaseSelect":"pleaseSelect",
                        "pleaseImport":"pleaseImport",
                        "spareCode":"spareCode",
                        "spareName":"spareName",
                        "query":"query",
                        "newAdd":"newAdd",
                        "forbidden":"forbidden",
                        "enable":"enable",
                        "update":"update",
                        "createTime":"createTime",
                        "isLoading":"isLoading",
                        "sequence":"sequence",
                        "operate":"operate",
                        "type":"type",
                        "StandardDetails":"StandardDetails",
                        "addStandard":"addStandard",
                        "updateStandard":"updateStandard",
                        "sure":"sure",
                        "cancel":"cancel",
                        "judgeName":"judgeName",
                        "spareClassDescribe":"spareClassDescribe",
                        "nonLossCode":"nonLossCode",
                        "nonLossPhenomenon":"nonLossPhenomenon",
                        "debitType":"debitType",
                        "debitCoefficient":"debitCoefficient",
                        "debitMoney":"debitMoney",
                        "updateTime":"updateTime",
                        "to":"to",
                        "faultPhenomenon":"faultPhenomenon",
                        "creator":"creator",
                        "updator":"updator",
                        "lastUpdateTime":"lastUpdateTime",
                        "judgeInfor":"judgeInfor"
                    }
                },
                nowLangue:{},

                formInline:{},
                tableData:[{
                    name:"111"
                }],
                /*新增*/
                dialogAddVisible:false,//新建弹窗
                addForm:{
                    price:"固定价"
                },//新建查询表单
                /*修改*/
                dialogUpdateVisible:false,//修改弹窗
                updateForm:{
                    price:"固定价"
                },//新建查询表单
                //按钮禁用
                selectDisabled:false,
                enableDisabled:false,
                forbiddenDisabled:false,

                loading:false,
                isPaging:true,    //是否显示分页
                pageIndex:1,    //当前页（必传）
                pageSize :10,   //每页多少条
                currentPage:1,    //当前显示3页
                currentPage3:3,
                totalNumber: 1,     //总条数
                totalPage:1    //总页数

            };
        },
        created:function(){
            var _this=this;
            _this.languageType=="zh"?_this.nowLangue=_this.language.zh:_this.nowLangue=_this.language.en;
        },
        computed:{
            languageType(){
                return this.$store.state.languageType;
            }
        },
        watch:{
            languageType(){
                var _this=this;
                _this.languageType=="zh"?_this.nowLangue=_this.language.zh:_this.nowLangue=_this.language.en;
            }
        },
        //进入页面立即运行此方法
        mounted: function () {
            var _this = this;
            _this.$store.commit('currentActive', 'NonLossStandard');
        },
        methods:{
            //备件小类查询
            /*dropSpareList(){
             var _this=this;
             $.ajax({
             type:'GET',
             url:_this.metadata_service+'subClass/findSubClassList',
             cache:false,
             dataType:'JSON',
             contentType:"application/json;charset=utf-8",
             success:function(data){
             if(data.success){
             _this.spareClassList=data.data;
             }else{
             _this.common.errorTip(data.errorMessage);
             }
             }
             })
             },*/
            //查询
            queryEngineer(){
                /*var _this=this;
                 _this.loading=true;
                 _this.loading2=false;
                 var tmp={
                 categoryCode:_this.formInline.categoryCode,
                 code:_this.formInline.code,
                 materialCode:_this.formInline.materialCode,
                 createStartTime:_this.formInline.createStartTime,
                 createEndTime:_this.formInline.createEndTime,
                 pageIndex:_this.pageIndex,
                 pageSize:_this.pageSize
                 };
                 $.ajax({
                 type: 'POST',
                 url: _this.metadata_service+"substituteGroup/queryProjectsstClusterByPage",
                 cache: false,
                 data:JSON.stringify(tmp),
                 dataType:'JSON',
                 contentType: "application/json;charset=utf-8",
                 success: function (data) {
                 if (data.success) {
                 _this.loading=false;
                 _this.isPaging=true;
                 _this.totalPage=data.data.totalPage;
                 _this.totalNumber=data.data.totalNumber;
                 _this.engReplaceData=data.data.dataList;
                 }else{
                 _this.loading=false;
                 _this.common.errorTip(data.errorMessage)
                 }
                 }
                 });*/
            },
            //新增
            createNew(){
                this.dialogAddVisible=true;
            },
            // 修改
            update(index,row){
                this.dialogUpdateVisible=true;
            },
            // 操作启用禁用
            handleStatus(index, row){
                /*var _this=this;
                 if(row.active){
                 row.active = false;
                 }else{
                 row.active = true;
                 }
                 var tmp={id: row.id,status: row.active};
                 $.ajax({
                 type: 'POST',
                 url: _this.metadata_service+"substituteGroup/updateStatus",
                 cache: false,
                 data:JSON.stringify(tmp),
                 dataType:'JSON',
                 contentType: "application/json;charset=utf-8",
                 success: function (data) {
                 if (data.success) {
                 if(row.active){
                 var successMessage1=_this.languageType=="zh"?'启用成功！':'Open Success';
                 _this.common.successTip(successMessage1);
                 }else{
                 var successMessage2=_this.languageType=="zh"?'禁用成功！':'Close Success';
                 _this.common.successTip(successMessage2);
                 }
                 }else
                 _this.common.errorTip(data.errorMessage);
                 }
                 });*/
            },
            //分页
            handleSizeChange(val) {
                // console.log(`每页 ${val} 条`);
                this.pageSize=val;

            },
            //点击页码分页查询点击事件
            handleCurrentChange(val) {
                // console.log(`当前页: ${val}`);
                this.pageIndex=val;

            }
        }
    }
</script>







